package team.mai.antexpress.utils;

public class Validator {

	public static final int USERNAME_MIN_LENGTH = 6;
	public static final int USERNAME_MAX_LENGTH = 18;
//	public static final int PASSWORD_MIN_LENGTH =
//	public static final int PASSWORD_MIN_LENGTH =

	public static boolean validate(String... strings) {
		boolean flag = true;
		for (String string : strings) {
			if (string == null || "".equals(string)) {
				flag = false;
				break;
			}
		}
		return flag;
	}

	public static boolean validateUserCredentials(String username, String password) {
		if(!validate(username, password))
			return false;
		return username.matches("[a-zA-Z][0-9a-zA-Z]{5,17}");
	}
}
